/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package ece.fr.edu.fac.controleur.outils;


import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.text.ParseException;


/**
 *
 * @author smarzoug
 */
public class DateAnalysis {
    
    public static java.sql.Date parseDate(String st) throws ParseException 
	{
            String par=st;

            Calendar cal = Calendar.getInstance();
            SimpleDateFormat s = new SimpleDateFormat("dd-MM-yyyy");

            //System.out.println();


            System.out.println(cal.getTimeInMillis());
            java.util.Date t= s.parse(par);
            System.out.println(t.getTime());
            java.sql.Date d = new java.sql.Date(t.getTime());
            System.out.println(d);

            return d;
	}
    
}
